/(!If:/(!Req:_panelConfig))/(!Else)
<!DOCTYPE html>
<html>
	<head>
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta charset="utf-8">
		/(!If:/(!Panel:!Title)=)
			<title>/(!Panel:!Property:Title)</title>
		/(!Else)
			<title>/(!Panel:!Title)</title>
		/(!If)

		<link rel="shortcut icon" href="/(!WsRes)/images/favicon.ico">
		<link rel="stylesheet" href="/(!WsRes)/css/sencha-touch.css" type="text/css">
		<link rel="stylesheet" href="/(!WsRes)/css/wcli.css" type="text/css">
		<link rel="stylesheet" href="/(!WsRes)/css/ux-date-picker.css" type="text/css">
		
		<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>		
		<script type="text/javascript" src="/(!WsRes)/js/sencha-touch-all-debug.js"></script>
		<!-- <script type="text/javascript" src="/(!WsRes)/js/phonegap.js"></script>  -->
		<script type="text/javascript" src="/(!WsRes)/js/wcli/nls.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/ux-date-picker.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/util.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/SmartPanel.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/CheckboxToggle.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/Select.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/Edit.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/Password.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/Button.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/List.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/DatePicker.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/Extras.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/Link.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/Picture.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/EditableGrid.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/Signature.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/signature_pad.js"></script>
		<script type="text/javascript" src="/(!WsRes)/js/wcli/Panel.js"></script>
		/(!AttachPoint:name=HeadArea)
		<script type="text/javascript">
		/(Embed:js:cdata)
			if(window.navigator.userAgent.indexOf("AppleWebKit") == -1 && window.navigator.userAgent.indexOf("MSIE 10.0") == -1){
				window.alert("This application only works in Google Chrome or Safari Browser or Internet Explorer 10");
			}
			function hideURLbar() {
				window.scrollTo(0, 1);
			}

			if (navigator.userAgent.indexOf('iPhone') != -1 || navigator.userAgent.indexOf('Android') != -1) {
				addEventListener("load", function() {
            		setTimeout(hideURLbar, 0);
    			}, false);
			}
			/(!AttachPoint:name=JSInit)
		/(Embed)
			Ext.setup({
				requires: ['Ext.Anim'],
				tabletStartupScreen: '/(!WsRes)/images/tablet_startup.png',
				phoneStartupScreen: '/(!WsRes)/images/phone_startup.png',
				icon: '/(!WsRes)/images/icon.png',
				glossOnIcon: true,
				standardSubmit: false,
				onReady: function() {
					Ext.os.deviceType = "Phone";
					var panelConfig = /(!If)({
						xtype: 'smartpanel',
						cls: 'x-tabpanel x-tabpanel-dark',
						panelId: /(PNLID),
						url: '/(WSACTION)',
						scroll: 'vertical',
						fullscreen: 'true',
						/(!If:/(!IsDefined:transition))
						transition: '/(transition)',
						transdir: '/(transdirection)',
						transduration: /(transduration),
						/(!If)
						layout: {
							type : 'vbox',
							align: 'stretch'
						},
						plexConfig: {
						  /(Embed:js:cdata)
							header: ([/(!AttachPoint:name=HeaderArea)]),
							body: ([/(!AttachPoint:name=MainArea)]),
							hidden: [/(!AttachPoint:name=HiddenArea)],
							fullscreen: [/(!AttachPoint:name=FullscreenArea)],
							toolbars: [/(!AttachPoint:name=ToolbarArea)],
							tabs: [/(!AttachPoint:name=TabbarArea)],
							footer: ([/(!AttachPoint:name=FooterArea)]),
						  /(Embed)
						},
						jsOnLoad: function() {
					      /(Embed:js:cdata)
								/(!AttachPoint:name=JSOnLoad)
						  /(Embed)  
						},
						cssArea: [ /(!AttachPoint:name=CSSArea:sep=,) ]
					})
					/(!If:/(!Req:_panelConfig))/(!Else)									

					window.panel = Ext.create('wcli.SmartPanel',panelConfig);
					window.panel.panelId = /(PNLID);
					
					/(!AttachPoint:name=ExtraController)
					
					window.controller = new Ext.Panel({
						fullscreen: true,
						layout: 'card',
						items: [panel]
					});
					
					/(!AttachPoint:name=Container)	
					
					panel.show();
					window.controller.show();
									
					wcli.util.addCSSArea(panelConfig.cssArea);
					panelConfig.jsOnLoad();
					
					/(!AttachPoint:name=JSOnReady)
				}
			});
			var keepsess = false;
			function /(!Panel:!NameID)_unload() {
				if (!keepsess) {
					Ext.Ajax.request({
						url: window.location.href,
						method: "POST",
						params: { _endsess: "true" },
					})
				}
			}
			window.beforeunload = /(!Panel:!NameID)_unload;
		</script>
	</head>
	<body onbeforeunload="/(!Panel:!NameID)_unload();" >
		/(!AttachPoint:name=LinkArea)	
	</body>
</html>
/(!If)